spotter (deprecated)

The open source plugin spotter is a QGIS tool that simplifies the workflow of importing and exporting geographic data, with particular attention to CSV and DXF files.

Main functions

  1. Import CSV: imports data from CSV files, sets the fields to be used and creates a georeferenced layer

    • File selection: you choose the CSV file to be imported through a dialogue box
    • Field configuration: the plugin reads the header of the CSV (where present) and lets you choose which fields to include
    • Key fields: you can state which columns hold the name, the latitude and the longitude. These fields are compulsory in order to georeference the data correctly
    • Creating a temporary layer: once the data has been imported, the plugin creates an in-memory layer in which every record becomes a point feature
    • Automatic labelling: if the name field is present, the plugin sets the labelling of the layer automatically, making the features easier to identify on the map
_images/sp1.png

Fig.1 The Import .csv functions

  1. Export CSV: lets you select a layer in the project, choose the fields to be exported, set the coordinate system and save the data to a new CSV file

    • Choosing the layer to export: the plugin lists the layers currently in the QGIS project so that you can choose the one to export
    • Export settings: you decide whether to include the header and which fields to export
    • Choosing the output CRS: you can choose the Coordinate Reference System for the export, which keeps the data compatible
    • Saving the file: the plugin exports the data in CSV format, applying any coordinate transformations and number formatting, and shows a progress bar while it works
_images/sp2.png

Fig.2 The Export .csv functions

  1. Import DXF: provides tools for loading DXF files, checking that the geometries are valid and placing the content on the map with an interactive tool (a click on the map)

    • Choosing the DXF file: lets you choose a DXF file holding geometries (lines or polygons)
    • Checking the geometries: the plugin checks that every geometry in the DXF is valid and supported (lines and polygons only)
    • Placing on the map: once the file has been checked, you click on the map to define the origin of the translation, so that the DXF is placed correctly in the coordinate system of the project
    • Creating an in-memory layer: after placement, a temporary layer is created showing the content of the DXF with a basic style (a red symbol, for instance) to make it easier to identify
_images/sp3.png

Fig.3 The Import .dxf functions

  1. Info: shows information about the plugin, including the version, the author, a description, the licence and useful links. Donation methods and other support resources can also be added here

    • Description and metadata: in the “Info” tab the plugin gives an overview with details such as the version, the author, a short description and links to the licence, the GitHub repository and other resources
    • Support links: links can be set up to contact the author (by e-mail, for instance) or to make donations through various channels (PayPal, Patreon, Ko-fi and so on), offering users several ways to support the project
_images/sp4.png

Fig.4 The software information

How do I download it?

  • Installation:
    • The plugin is distributed as source code, downloadable zipped from GitHub here
    • Once it has been installed through the QGIS plugin manager, an icon and/or a menu entry for “spotter” appears

How is it used?

  • Starting the plugin:
    • Clicking the icon or choosing the plugin from the menu opens the dialogue with its tabs
  • Workflow:
    • To import CSV data: select the file, set the fields and import. The layer is added to the project and you can edit it straight away
    • To export data: choose the layer to export, set the parameters and save the CSV file, with the coordinates transformed if necessary
    • To import DXF: select the DXF file, check the geometries and place the content on the map by clicking at the point you want

Video

  • Downloading the spotter plugin and installing it in QGIS, here
  • A short introduction to the plugin and its use together with csv2dat at this link

Architecture

The plugin has been tested with the latest versions of QGIS from 3.34 onwards and is split into several files, one per component:

main.py: holds the definition of the CombinedCsvDialog class, which handles the user interface and every function. The methods for each tab (CSV import, CSV export, DXF import, Info tab) and their logic are defined here.

spotter_plugin.py: defines the main SpotterPlugin class, which fits the dialogue into the life cycle of a QGIS plugin. Initialisation, adding the action to the interface and handling the start and the closing of the plugin happen here.

__init__.py: holds the classFactory(iface) function that exposes the plugin to QGIS. It imports the SpotterPlugin class and returns it, so that QGIS can initialise the plugin properly.

Other files (optional): resource files (such as icon.png for the icon) and licence files (such as LICENSE) documenting the licence of the plugin.

Note

  • spotter is an open source project under the GPL-3.0 license
  • you can support the project from here
  • you can ask for changes or custom extensions by writing to solutop@gmail.com
  • you can modify the source code as long as the licence mentioned above is kept